import 'package:flutter_enjoy_plus/constants/index.dart';
import 'package:flutter_enjoy_plus/utils/RequestDio.dart';

// 发送验证码
Future<dynamic> sendCodeAPI(params) =>
    requestDio.get(HTTP_PATH.SEND_CODE, params: params);

// 登录
Future<dynamic> loginAPI(data) => requestDio.post(HTTP_PATH.LOGIN, data: data);

// 获取用户信息
Future<dynamic> getUserInfoAPI() => requestDio.get(HTTP_PATH.USER_INFO);

// 更新用户昵称
Future updateUserInfoAPI(data) =>
    requestDio.put(HTTP_PATH.USER_INFO, data: data);

// 上传头像
Future uploadFileAPI(data) =>
    requestDio.uploadFile(HTTP_PATH.UPLOAD, data: data);
